package com.ag.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbEventPlan entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_EVENT_PLAN", schema = "dbo", catalog = "AGDB")
public class TbEventPlan implements java.io.Serializable {

	// Fields

	private String EId;
	private TbUser tbUserByRequireId;
	private TbPlan tbPlan;
	private TbEvent tbEvent;
	private TbUser tbUserByEpPeople;
	private String epReason;
	private Date epTime;
	private Date esTime;
	private Integer epStartLevel;
	private Integer epRequire;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbEventPlan() {
	}

	/** minimal constructor */
	public TbEventPlan(String EId, TbEvent tbEvent, TbUser tbUserByEpPeople,
			String epReason, Date epTime) {
		this.EId = EId;
		this.tbEvent = tbEvent;
		this.tbUserByEpPeople = tbUserByEpPeople;
		this.epReason = epReason;
		this.epTime = epTime;
	}

	/** full constructor */
	public TbEventPlan(String EId, TbUser tbUserByRequireId, TbPlan tbPlan,
			TbEvent tbEvent, TbUser tbUserByEpPeople, String epReason,
			Date epTime, Date esTime, Integer epStartLevel, Integer epRequire,
			String a, String b, String c) {
		this.EId = EId;
		this.tbUserByRequireId = tbUserByRequireId;
		this.tbPlan = tbPlan;
		this.tbEvent = tbEvent;
		this.tbUserByEpPeople = tbUserByEpPeople;
		this.epReason = epReason;
		this.epTime = epTime;
		this.esTime = esTime;
		this.epStartLevel = epStartLevel;
		this.epRequire = epRequire;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@Id
	@Column(name = "E_ID", unique = true, nullable = false, length = 10)
	public String getEId() {
		return this.EId;
	}

	public void setEId(String EId) {
		this.EId = EId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REQUIRE_ID")
	public TbUser getTbUserByRequireId() {
		return this.tbUserByRequireId;
	}

	public void setTbUserByRequireId(TbUser tbUserByRequireId) {
		this.tbUserByRequireId = tbUserByRequireId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "P_ID")
	public TbPlan getTbPlan() {
		return this.tbPlan;
	}

	public void setTbPlan(TbPlan tbPlan) {
		this.tbPlan = tbPlan;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "E_ID", unique = true, nullable = false, insertable = false, updatable = false)
	public TbEvent getTbEvent() {
		return this.tbEvent;
	}

	public void setTbEvent(TbEvent tbEvent) {
		this.tbEvent = tbEvent;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EP_PEOPLE", nullable = false)
	public TbUser getTbUserByEpPeople() {
		return this.tbUserByEpPeople;
	}

	public void setTbUserByEpPeople(TbUser tbUserByEpPeople) {
		this.tbUserByEpPeople = tbUserByEpPeople;
	}

	@Column(name = "EP_REASON", nullable = false, length = 1024)
	public String getEpReason() {
		return this.epReason;
	}

	public void setEpReason(String epReason) {
		this.epReason = epReason;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EP_TIME", nullable = false, length = 23)
	public Date getEpTime() {
		return this.epTime;
	}

	public void setEpTime(Date epTime) {
		this.epTime = epTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "ES_TIME", length = 23)
	public Date getEsTime() {
		return this.esTime;
	}

	public void setEsTime(Date esTime) {
		this.esTime = esTime;
	}

	@Column(name = "EP_START_LEVEL")
	public Integer getEpStartLevel() {
		return this.epStartLevel;
	}

	public void setEpStartLevel(Integer epStartLevel) {
		this.epStartLevel = epStartLevel;
	}

	@Column(name = "EP_REQUIRE")
	public Integer getEpRequire() {
		return this.epRequire;
	}

	public void setEpRequire(Integer epRequire) {
		this.epRequire = epRequire;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}